﻿using Microsoft.AspNetCore.Mvc;

namespace EMall.IdentityService
{
    public class IdentityServiceDefaults
    {
        public static List<string> Scopes = GetControllers().Select(type => $"IdentityService.{type.Name.Replace("Controller", "")}").ToList();
        public static IEnumerable<Type> GetControllers()
        {
            return System.Reflection.Assembly.GetExecutingAssembly()
                .GetTypes()
                .Where(type => typeof(ControllerBase).IsAssignableFrom(type));
        }
    }
}
